package licode.unisop.client.config;

import feign.RequestInterceptor;
import licode.unisop.client.feign.impl.SopFeignRequestInterceptor;
import licode.unisop.client.service.filter.SopAuthorizationHandler;
import licode.unisop.client.service.filter.SopAuthorizationInterceptor;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * 自动配置类
 *
 * @author licode
 */
@Configuration
@ComponentScan(basePackages = {"licode.unisop.client"})
@EnableFeignClients(basePackages = {"licode.unisop.client.feign"})
public class SopClientAutoConfig {
    public RequestInterceptor getRequestInterceptor() {
        return new SopFeignRequestInterceptor();
    }
}
